#pragma once

#include <memory>
#include <set>

#include "gui/layout.h"
#include "gui/widget.h"

class Button;
class ButtonPanel;
class Entity;
class GUIMessage;

class CardPanel:public Widget{
    public:
        CardPanel();

        virtual std::string GetType(){ return "CardPanel"; }

        void Populate(Entity* entity);

        void Switch(std::string name);

//        void BuildVBO(){}

    protected:
        Widget* GetPanel(std::string name);
        void ClearPreviousEntries();
        void FillPanel(std::string panel_name, std::set<int> ids, std::string message_type = "none");
        void FillPanel(std::string panel_name, std::set<std::string> names, std::string message_type = "none");
        void AddButton(Widget* panel, Entity* entity, std::unique_ptr<GUIMessage> message = nullptr);

        GUIMessage* ProcessMessage(GUIMessage* message);

        std::vector<std::string> names;
};
